export default (err, req, res, next) => {
  if (err) {
    res.json({
      code: -1,
      data: null,
      message: err.message
    })

    return
  }

  next()
}
